Jump to content

Project:Support desk

About this board

Welcome to the MediaWiki Support desk. This is a place where you can ask any questions you have about installing, using or administrating the MediaWiki software.

(Read this message in a different language)

See also

Before you post

Post a new question

  1. To help us answer your questions, please indicate which version of MediaWiki you are using, as found on your wiki's Special:Version page:
  2. If possible, add $wgShowExceptionDetails = true;error_reporting( -1 );ini_set( 'display_errors', 1 ); to LocalSettings.php in order to make MediaWiki show more detailed error messages.
  3. Please include the web address (URL) to your wiki if possible. It's often easier for us to identify the source of the problem if we can see the error directly.
  4. To start a new thread, click the box with the text "Start a new topic".
Larslaki (talkcontribs)

Hello I'm trying to use the mediawiki api using R.

I have tried to delete a page in my wiki. I got an error message saying that I'm not an administrator. But this is not the case.  A fresh installation also produced the same result. The administrator account seems to be assigned only limited rights.

If I assign the 'delete' option to the sysop group in the localsettings, this is not applied. However, if I assign delete for all user groups (*) it works. But this is too insecure as solution.

Can someone please help me or give me hints on how to solve this.

Bawolff (talkcontribs)

Are you sure that your account is actually an administrator? If you go to Special:preferences (or Special:listusers ) what groups does it say you are a member of?


If you are using the api, are you using either bot passwords or oauth? If so you need to take grants into account.

Larslaki (talkcontribs)

Thank you for your help!

Yes it is administrator. I'm not using bot passwords. I used action=login with password and username for an user which is administrator.

It seems that the login via api is somehow limiting the rights. If I'm checking the user information getting after API login it is also described as admin but with a different set of rights (only 10 including the right to edit but not delete).

How to login and keeping the rights which are visible for admins on the User group rights page?

Reply to "group permission"

Hiding parameters when they are empty

2
2001:1C04:3B16:5400:79BB:BEC6:AC51:4E3D (talkcontribs)

I got a infobox looking like this

{|type="hide-lonely-labels"; style="float: right; padding: 5px; background: #eaecf0; border: 3px solid #000000; width: 25%; margin-left: 3px" ! colspan="2"; style="text-align: center;" | <span style="font-size: larger;">{{{name|}}}</span> |- | colspan="2"; style="text-align: center;" | [[File:{{{image|}}}|250px]] |- |- style="vertical-align:top;" ! style="text-align: left;"|'''Created by''' | {{{created_by|}}} |- |- style="vertical-align:top;" ! style="text-align: left;"| '''Release date''' | {{{release_date|}}} |- |- style="vertical-align:top;" ! style="text-align: left;"| '''Candidates''' | {{{candidates|}}} |- |- style="vertical-align:top;" ! style="text-align: left;"| '''Parties''' | {{{parties|}}} |- |- style="vertical-align:top;" ! style="text-align: left;"| '''Historical result''' | {{{historical_result|}}} |- |- style="vertical-align:top;" ! style="text-align: left;"| '''Canon result''' | {{{canon_result|}}} |}

How do I hide release date, candidate, parties, historical result, and canon result if they are empty?

Bawolff (talkcontribs)
Reply to "Hiding parameters when they are empty"

MediaWiki + Visual Editor Problems

2
77.87.191.179 (talkcontribs)

Hi guys,

i've got a problem with my MediaWiki Installation.

I installed MediaWiki 1.39, activated Visual Editor, but it doesn't work.

curl test with redirect works also.

curl 'http://localhost/mediawiki/rest.php/v3/page/Hauptseite_IT-Doku_Klinikmed_-_IT/html'

<a href="http://localhost/mediawiki/rest.php/v1/page/Hauptseite_IT-Doku_Klinikmed_-_IT/html">here</a>.</p>

curl 'http://localhost/mediawiki/rest.php/v1/page/Hauptseite_IT-Doku_Klinikmed_-_IT/html'

works also.

But start Visual Editor from MediaWiki, i always get a 404 error, see also apache2 access.log

::1 - - [12/Nov/2024:16:47:41 +0100] "GET /mediawiki/rest.php/localhost/v3/page/html/Thinclient/44678?redirect=false&stash=true HTTP/1.1" 404 542 "-" "VisualEditor-MediaWiki/1.39.9"

127.0.0.1 - - [12/Nov/2024:16:47:41 +0100] "GET /mediawiki/api.php?action=visualeditor&format=json&paction=parse&page=Thinclient&uselang=de&formatversion=2&oldid=44678 HTTP/1.1" 200 881 "http://localhost/mediawiki/index.php?title=Thinclient&veaction=edit&section=2" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:132.0) Gecko/20100101 Firefox/132.0"


Everything's seems to be configured correctly, but i get a 404 error.

My LocalSettings.php:

# DebugLog

$wgDebugLogFile = "/var/log/mediawiki-debug.log";

$wgLogPrefix = 'restbase: ';

$wgDebugLogGroups['restbase'] = '/var/log/mediawiki/restbase.log';

$wgDebugLogGroups['VisualEditor'] = '/var/log/mediawiki/VisualEditor.log';

$wgDebugLogGroups['Parsoid'] = '/var/log/mediawiki/Parsoid.log';

## Default skin: you can change the default skin. Use the internal symbolic

## names, ie 'vector', 'monobook':

$wgDefaultSkin = "vector";

# Enabled skins.

# The following skins were automatically enabled:

wfLoadSkin( 'CologneBlue' );

wfLoadSkin( 'Modern' );

wfLoadSkin( 'MonoBook' );

wfLoadSkin( 'Vector' );

# VisualEditor

wfLoadExtension( 'VisualEditor' );

# wfLoadExtension( 'Parsoid', 'vendor/wikimedia/parsoid/extension.json' );

$wgDefaultUserOptions['visualeditor-editor'] = "visualeditor"; // Setzt VisualEditor als Standard

$wgVisualEditorEnableWikitext = true;

$wgDefaultUserOptions['visualeditor-enable'] = 1;

$wgHiddenPrefs[] = 'visualeditor-enable';

$wgVisualEditorEnableWikitext = true;

$wgVisualEditorParsoidURL = 'http://localhost/mediawiki/rest.php';

$wgVisualEditorRestbaseURL = 'http://localhost/mediawiki/rest.php/v1/page/';  // Direkt auf `v1` verweisen

$wgVirtualRestConfig['modules']['parsoid'] = [

   'url' => 'http://localhost/mediawiki/rest.php'  // URL zur Parsoid REST-API

];

Bawolff (talkcontribs)

Could be a virtual host issue in your webserver config maybe.

Reply to "MediaWiki + Visual Editor Problems"
BKCSTL (talkcontribs)

1.26 to 1.35.14 ( on the way to latest update)

Uploaded the files, went to /mw-config/index.php - changed the language to en from en-gb, then got :

[de00b84bcce814fa958844d2] /wiki3/mw-config/index.php Error from line 408 of /home/universe/public_html/wiki3/extensions/IntraACL/includes/GlobalFunctions.php: Call to undefined function wfProfileIn()

Backtrace:

#0 /home/universe/public_html/wiki3/extensions/IntraACL/includes/GlobalFunctions.php(372): haclfInitContentLanguage(string)

#1 /home/universe/public_html/wiki3/extensions/IntraACL/includes/GlobalFunctions.php(48): haclfInitNamespaces()

#2 /home/universe/public_html/wiki3/LocalSettings.php(199): enableIntraACL()

#3 /home/universe/public_html/wiki3/includes/installer/Installer.php(661): require(string)

#4 /home/universe/public_html/wiki3/includes/installer/WebInstallerExistingWiki.php(29): Installer::getExistingLocalSettings()

#5 /home/universe/public_html/wiki3/includes/installer/WebInstaller.php(269): WebInstallerExistingWiki->execute()

#6 /home/universe/public_html/wiki3/mw-config/index.php(82): WebInstaller->execute(array)

#7 /home/universe/public_html/wiki3/mw-config/index.php(40): wfInstallerMain()

#8 {main}


How to fix?

Malyacko (talkcontribs)
BKCSTL (talkcontribs)

So, I would need to create a startprofiler.php (copy from startprofiler.sample) and add the suggested code?

Bawolff (talkcontribs)

No, that is not what Malyacko is suggesting and it won't help.

BKCSTL (talkcontribs)

Would it be easier to install latest version and import previous contents?

TheDJ (talkcontribs)

it is always an option, but it is hard to do without preserving full authorship records (all users would have to recreate their account before importing) and some of the state is not exportable. I'd always favour a normal upgrade where possible.

Bawolff (talkcontribs)

The IntraAcl extension is not compatible with mediawiki 1.35. Maybe there is a newer version available you could download. If not you have to disable the extension.

Reply to "Trying to Upgrade"

Hiding empty brackets on infoboxes

3
Appelmonkey (talkcontribs)

Hey there I am trying to make an infobox for one of the wikis I am a part off, but I can't for the life of me figure out how to hide brackets if they have no text. Is there a trick to it? Thanks in advance.

Jonathan3 (talkcontribs)

Use {{{Fieldname|}}} with that bar/pipe symbol.

TheDJ (talkcontribs)
Reply to "Hiding empty brackets on infoboxes"

Deleted Actor Table - No Backup

3
2600:1700:FA40:11B0:4590:DF24:5DB0:8CF7 (talkcontribs)

I was trying to purge thousands of spam actors on my MediaWiki database in the actor table. I accidentally deleted the dozen or so real people and now the entire site is broken. I have no backup of the table or database. How can I possible restore the information even if manually readding the few rows?

2600:1700:FA40:11B0:F864:19B4:604:95F7 (talkcontribs)

Thankfully, hosting provider had backups and was able to do a full restore.

2600:1700:FA40:11B0:F864:19B4:604:95F7 (talkcontribs)

If anyone is able to provide help on how to purge users from the User list, that would be helpful. They're gone from everywhere inclusive of spam pages they created...but still show on the Special:ListUsers page.

Reply to "Deleted Actor Table - No Backup"

Missing category entries

6
Andrew Branscom (talkcontribs)

I am in the process of merging my other wikis into one. I can easily import the pages from these other wikis, but they are not added to existing categories until a page is saved. This is becoming a rather large wiki and having to save each and every page to fix the categories has become a large task. Is there a way to mass update the categories with the imported pages? The merged wiki is version 1.41.1.

Bawolff (talkcontribs)

refreshLinks.php cli script will do this


Although in principle they should be added automatically on import, so maybe you are experiencing some sort of bug.

TheDJ (talkcontribs)

@Andrew Branscom do you have a job runner ? Cause if u do imports without a continuous job runner in the background, you might be behind on processing background jobs

Andrew Branscom (talkcontribs)

I have no root access to my server. I do have cPanel access. It sounds like refreshLinks.php is what I need. I see it in the maintenance folder, but am not quite sure how to run it. Forgive me for my ignorance in this. Am I able do it from my cPanel or browser?

Bawolff (talkcontribs)

You don't need root access but you do need shell (also called ssh or terminal) access.


As a work around, if you only have cpanel, sometimes cpanel lets you set cron scripts which can be used as a work around.

Andrew Branscom (talkcontribs)

I don't have shell access. I have never done anything with cron scripts. My cPanel has a Cron Jobs section that has frequency fields and a command field, but am unsure exactly what to enter. I should mention that there are other databases on my account, like for a phpBB forum. There are a couple of different PHP versions assigned.

I doubt that I can get much help from my hosting service. Another company bought my hosting service and now has lousy support. There is no longer any phone support

My Wikis have pages with code examples and newer versions of the Wikis changed the GeSHi SyntaxHighlight highlighter to requires the installation of Pygments, which broke my highlighting. The new hosting service refuses to install Pygments. I do not bring this up to ask for help with that, but just as an example of how unhelpful their support has been. The previous company had great support.

Reply to "Missing category entries"

Where to put this orphaned manual in Manual:Contents

9
Waddie96 (talkcontribs)
Waddie96 (talkcontribs)

@Shirayuki: : ping contributor to Manual that is still active

Shirayuki (talkcontribs)

Since the only page passing both dev=y and admin=y in {{Hubs}} is Manual:Maintenance scripts, I personally think it would be good to place it near that.

This post was hidden by Ciencia Al Poder (history)
Waddie96 (talkcontribs)

How would one do that? (Mistakenly replied without having logged in).

Waddie96 (talkcontribs)
Shirayuki (talkcontribs)

I can't do it, so you should ask someone else. Besides, this is a topic that should be discussed on the Project:Village Pump.

Waddie96 (talkcontribs)
Moved to Project:Village Pump: Topic:Yd4re880bhktb47q.
This post was hidden by ToadetteEdit (history)
Reply to "Where to put this orphaned manual in Manual:Contents"

Template Styles Fatal Error

11
FXWorks (talkcontribs)

My search-fu can't seem to find a solution.

I'm trying to upgrade my Mediawiki installation from 1.39.3 to 1.42.3. Probably shouldn't matter but I'm using the official container.

I've run the installer/upgrader and the database was updated and whatnot.

I've upgraded all the skins and templates to the appropriate versions for 1.42 but I can't seem to get around an issue with TemplateStyles.

I get a fatal error:

https://fxide.io/TemplateStyles_mediawiki_error.txt

Disabling the extension makes the site work correctly but with the <templatestyles blah blah> stuff inline as expected.

I thought it might be related to jumping too many versions?

Or is it something else?

I'm testing the upgrade on a VM so it's not a big deal to tear it all down and add an intermediate upgrade step but if I can I'd like to avoid that (time constrained).

Docs say LTS to LTS is ok or did I misread?

Did I miss a "new and exciting" configuration step?

Missing something obvious?

Anyone have any insights?


Thanks a bunch!

Samwilson (talkcontribs)

@FXWorks: Are you sure you've got the right extension versions? It looks like it might not be using the 1.42 compatible version of TemplateStyles.

Bawolff (talkcontribs)

You are the second person to report something like this, so it might be an issue in the extension.

Bawolff (talkcontribs)
Bawolff (talkcontribs)

As a work around, you can use composer to change the wikimedia/scoped-callback package in TemplateStyles extension to version 4.0.0 (Using a command like composer require wikimedia/scoped-callback:4.0.0 run inside the extension/TemplateStyles directory).

Hopefully a new version of the extension will be issued soon.

Fabioski01 (talkcontribs)

fix worked. Thanks!

FXWorks (talkcontribs)

Just to double confirm - the work around worked for me also.

Now to debate whether or not to apply this to my production site or wait for an update/fix to the template.

FXWorks (talkcontribs)

Thanks for the attention to this @Samwilson and @Bawolff

I did use the download version picker widget linked from the official web page for the template. The filename is

TemplateStyles-REL1_42-1a2e46c.tar.gz

Short on cycles at the moment, may try the composer work around later.


Thank you!

Fabioski01 (talkcontribs)

Having the same exact problem. I get extensionDependencyError: TemplateStyles is not compatible with the current MediaWiki core (version 1.42.3), it requires: >= 1.43.\n in

even if I downloaded the 1.42 stable.

Bawolff (talkcontribs)

@Fabioski01: - that is a different problem and likely unrelated. Are you sure you downloaded the right version? What is the filenane of your download.

Fabioski01 (talkcontribs)

TemplateStyles-REL1_42-1a2e46c

Reply to "Template Styles Fatal Error"

Permisos sysop como administrador

1
181.29.134.107 (talkcontribs)

¡Buen día y GRACIAS por la atención!

Soy fundador de una wiki colaborativa. Cuando quiero editar, agregando código CSS desde la página "Common.css", y no me deja por no tener permisos como administrador.

No sé cómo solucionar esta cuestión.

Las líneas de código que comparto a continuación pertenecen al archivo "LocaSetting.php" =>

// Permisos para la extensión Widgets

$wgGroupPermissions['sysop']['widgets'] = true;

$wgGroupPermissions['*']['widgets'] = false;

$wgGroupPermissions['sysop']['createpage'] = true;

$wgGroupPermissions['sysop']['edit'] = true;

$wgGroupPermissions['sysop']['delete'] = true;

$wgGroupPermissions['sysop']['comment-delete'] = true; // Si la extensión lo permite

$wgGroupPermissions['sysop']['editinterface'] = true;

$wgGroupPermissions['sysop']['userrights'] = true;

$wgGroupPermissions['sysop']['move'] = true;


$wgGroupPermissions['sysop']['editsitecss'] = true;

$wgGroupPermissions['sysop']['editsitejs'] = true;


¡Nuevamente GRACIAS!

Reply to "Permisos sysop como administrador"